<!DOCTYPE html>
<html lang="en">
<head>
[#include "/customer/include/static.htm"]
[#include "/customer/include/header.ftl"]
<style type="text/css">
	a.modify_pwd{color: #f00;}
	a.modify_pwd:hover { text-decoration: underline; }
</style>
</head>
<!--主体-->
<!--头部-->
<link href="${path}/resources/plug/layui/css/layui.css" rel="stylesheet" type="text/css"/>
<script src="${path}/resources/plug/layui/layui.js" type="text/javascript"></script>
<link href="${path}/resources/css/user.css?v=2" rel="stylesheet" type="text/css"/>
<div class="member">
    <!--左边-->
[#include "/customer/include/member_left_menu.ftl"]
		<!--左栏 end-->
		<!--右栏-->
    <div class="member_tab_info">
        <table class="layui-table ">
        <tbody>
        <form class="layui-form" id="form1">
						<dl style="margin-left: 300px;margin-top: 50px;">
							<dt><font size="3">解绑银行卡所需附件：</font></dt>
							<dd>
                                <input type="file" id="pic1" name="cardBTn" class="layui-upload-file">
                                <div id="allImage">
                                [#if images??]
                                    [#list images as img]
                                        <img alt="" src="${img.img}" width="90px" height="90px">
                                    [/#list]
                                [/#if]
                                    <tr>
							</dd>
						</dl>



        </tr>


					[#if  imglog==null ]
                        <button  style="margin-left: 300px" lay-submit lay-filter="MainForm" class="layui-btn"  style="width: 100px;background-color: #f3485a">提交</button>
					[/#if]
[#if imglog.status == 2]
                            <button  style="margin-left: 300px" lay-submit lay-filter="MainForm" class="layui-btn"  style="width: 100px;background-color: #f3485a">提交</button>
[/#if]
[#if  imglog.status == 0]
						<input name="submit"
							type="submit"  style="margin-left: 300px"class="layui-btn" value="审核中" disabled="disabled"><span></span>[/#if]
[#if imglog.status == -1 ]
						<input name="submit"
							type="submit"  style="margin-left: 300px" class="layui-btn" value="审核通过" disabled="disabled"><span></span>[/#if]
						[#if imglog.status == -1]
                            <button lay-submit  style="margin-left: 300px" lay-filter="MainForm" class="layui-btn"  style="width: 100px;background-color: #f3485a">重新认证</button>
						[/#if]
        </form>
<tr>
            <p  style="margin-left: 300px">【换卡流程】：</p>
            <p  style="margin-left: 300px">商户应做到如下换卡流程</p>
            <p  style="margin-left: 300px">如果上传错误，后台会进行驳回</p>
            <p  style="margin-left: 300px">1）提供身份证正反面、新银行卡照片；</p>
            <p  style="margin-left: 300px">2）提供本人与身份证、新银行卡的合照；</p>
            <p  style="margin-left: 300px">3）若是因原银行卡丢失换卡，另需提供原银行卡的挂失证明和新卡的开户证明；</p>
            <p  style="margin-left: 300px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;若是因银行卡不支持快捷支付或其他情况换卡，另需提供原银行卡照片以及原银行卡与本人的合照；</p>
            <p  style="margin-left: 300px">4）商户需要审核本人与身份证上的照片是否一致，原银行卡和新银行卡是否和持卡人提供的资料一致</p>
                </tr>

            </tbody>
            </table>

			</div>
		</div>


</div>

<!--主体 end-->

<script>
    $(function() {
        layui.use(['form','upload'],function(){
            var form = layui.form(), $=layui.jquery, layer = layui.layer;
            layui.upload({
                elem:'#pic1'
                ,url: '/system/upload/submit'
                ,success: function(res){
                    if (res["error"] == 0) {
                        $("#form1").append("<input type='hidden' class='layui-input' name='imgall' value="+res["url"]+" checked>");
                        $("#allImage").append(
                                '<img alt="" src="'+res["url"]+'" width="90px" height="90px">');
                    } else {
                        layer.msg(res["message"]);
                    }
                }
            });



            form.on('submit(MainForm)', function(data){

                var index = layer.load();
                ajax({
                    url:"${path}/member/bank/unbind",
                    data: $("#form1").serialize(),
                    success: function(result){
                        layer.msg(result.content,function() {
                          //  location.reload();
                        });
                        layer.close(index);
                    },
                    complete:function(){
                        layer.close(index);
                    },error:function(){
                        layer.close(index);
                    }
                });
                return false;
            });
        });
    });

</script>
[#include "/customer/include/footer.ftl"]
</body>
</html>